﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Imagin.Controls.Common">
    <Style x:Key="{x:Type local:DragSelection}" TargetType="{x:Type local:DragSelection}">
        <Setter Property="Background" Value="#55349ADE"/>
        <Setter Property="BorderBrush" Value="#2489cd"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type local:DragSelection}">
                    <Canvas x:Name="PART_Canvas">
                        <Border 
                            x:Name="PART_Rectangle" 
                            DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                            BorderThickness="{TemplateBinding BorderThickness}" 
                            BorderBrush="{TemplateBinding BorderBrush}" 
                            Background="{TemplateBinding Background}" 
                            CornerRadius="1"  
                            Height="{Binding Selection.Height}"
                            Width="{Binding Selection.Width}"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>